{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-1-b98bec16306c>, line 4)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-1-b98bec16306c>\"\u001b[1;36m, line \u001b[1;32m4\u001b[0m\n\u001b[1;33m    if today == 'Saturday','Sunday','Monday','Friday':\u001b[0m\n\u001b[1;37m                          ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekdays = [Tuseday,Wednesday,Thusday]\n",
    "if today == 'Saturday','Sunday','Monday','Friday'： #还是要把它们封装起来\n",
    "    print('恭喜恭喜今天不用上课')\n",
    "else:\n",
    "    print('今天上课不要迟到哦')\n",
    "    \n",
    "if today == 'Tuseday':\n",
    "    print('新媒体分析、虚拟演播厅、数码插画')\n",
    "if today == 'Wednesday':\n",
    "    print('APP设计、平台经济、形势与政策')\n",
    "if today == 'Thusday':\n",
    "    print('数码照片、文艺美学、流行文化、就业指导')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (<ipython-input-2-6a22f43870f4>, line 6)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-2-6a22f43870f4>\"\u001b[1;36m, line \u001b[1;32m6\u001b[0m\n\u001b[1;33m    if today == 'weekend'： #还是要把它们封装起来\u001b[0m\n\u001b[1;37m                         ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = [Saturday,Sunday,Monday,Friday]\n",
    "weekdays = [Tuseday,Wednesday,Thusday]\n",
    "\n",
    "if today == 'weekend'： \n",
    "    print('恭喜恭喜今天不用上课')\n",
    "else:\n",
    "    print('今天上课不要迟到哦')\n",
    "    \n",
    "if today == 'Tuseday':\n",
    "    print('新媒体分析、虚拟演播厅、数码插画')\n",
    "if today == 'Wednesday':\n",
    "    print('APP设计、平台经济、形势与政策')\n",
    "if today == 'Thusday':\n",
    "    print('数码照片、文艺美学、流行文化、就业指导') #字符错了\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (<ipython-input-3-cdb3231274bc>, line 6)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-3-cdb3231274bc>\"\u001b[1;36m, line \u001b[1;32m6\u001b[0m\n\u001b[1;33m    if today == 'weekend'：\u001b[0m\n\u001b[1;37m                         ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = [Saturday,Sunday,Monday,Friday]\n",
    "weekdays = [Tuseday,Wednesday,Thusday]\n",
    "\n",
    "if today == 'weekend': \n",
    "    print('恭喜恭喜今天不用上课')\n",
    "else:\n",
    "    print('今天上课不要迟到哦')\n",
    "    \n",
    "if today == 'Tuseday':\n",
    "    print('新媒体分析、虚拟演播厅、数码插画')\n",
    "if today == 'Wednesday':\n",
    "    print('APP设计、平台经济、形势与政策')\n",
    "if today == 'Thusday':\n",
    "    print('数码照片、文艺美学、流行文化、就业指导') #字符怎么又错了\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'Saturday' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-4-e74dd5edc7ba>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mdatetime\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[0mtoday\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtoday\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mweekday\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mweekend\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mSaturday\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mSunday\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mMonday\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mFriday\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[0mweekdays\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mTuseday\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mWednesday\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mThusday\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'Saturday' is not defined"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = [Saturday,Sunday,Monday,Friday]\n",
    "weekdays = [Tuseday,Wednesday,Thusday]\n",
    "\n",
    "if today == 'weekend': \n",
    "    print('恭喜恭喜今天不用上课')\n",
    "else:\n",
    "    print('今天上课不要迟到哦')\n",
    "    \n",
    "if today == 'Tuseday':\n",
    "    print('新媒体分析、虚拟演播厅、数码插画')\n",
    "if today == 'Wednesday':\n",
    "    print('APP设计、平台经济、形势与政策')\n",
    "if today == 'Thusday':\n",
    "    print('数码照片、文艺美学、流行文化、就业指导') #为什么不能直接输入Saturday?  #噢噢因为我少了‘’这个符号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "今天没有课\n",
      "今天没有课\n",
      "今天没有课\n",
      "今天没有课\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = ['Saturday','Sunday','Monday','Friday']\n",
    "weekdays = ['Tuseday','Wednesday','Thusday']\n",
    "\n",
    "for i in weekend:\n",
    "    print('今天没有课') #从简单的开始。。。\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-6-a5dcc39847a7>, line 4)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-6-a5dcc39847a7>\"\u001b[1;36m, line \u001b[1;32m4\u001b[0m\n\u001b[1;33m    if today == 'Saturday','Sunday':\u001b[0m\n\u001b[1;37m                          ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "\n",
    "if today == 'Saturday','Sunday':  #好吧这里是无效语法\n",
    "    print('今天没有课')\n",
    "else:\n",
    "    print('今天上课别迟到哦') \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-7-f15316b6cf1a>, line 8)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-7-f15316b6cf1a>\"\u001b[1;36m, line \u001b[1;32m8\u001b[0m\n\u001b[1;33m    else:\u001b[0m\n\u001b[1;37m       ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "\n",
    "if today == 'Saturday':\n",
    "    print('今天没有课')\n",
    "elif today == 'Sunday':\n",
    "    print('今天没有课')\n",
    "    else:\n",
    "        print('今天上课别迟到哦')\n",
    "else:\n",
    "    print('今天上课别迟到哦') #太难了，算了，我冷静一下，先做一下乘法表吧"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "1*1=1\t\n",
      "2*1=2\t2*2=4\t\n",
      "3*1=3\t3*2=6\t3*3=9\t\n",
      "4*1=4\t4*2=8\t4*3=12\t4*4=16\t\n",
      "5*1=5\t5*2=10\t5*3=15\t5*4=20\t5*5=25\t\n",
      "6*1=6\t6*2=12\t6*3=18\t6*4=24\t6*5=30\t6*6=36\t\n",
      "7*1=7\t7*2=14\t7*3=21\t7*4=28\t7*5=35\t7*6=42\t7*7=49\t\n",
      "8*1=8\t8*2=16\t8*3=24\t8*4=32\t8*5=40\t8*6=48\t8*7=56\t8*8=64\t\n",
      "9*1=9\t9*2=18\t9*3=27\t9*4=36\t9*5=45\t9*6=54\t9*7=63\t9*8=72\t9*9=81\t"
     ]
    }
   ],
   "source": [
    "for i in range(1,10):\n",
    "    print(\"\")\n",
    "    for j in range(1,i+1):\n",
    "        sum = i*j\n",
    "        print(str(i)+\"*\"+str(j)+\"=\"+str(sum),end=\"\\t\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "#好的现在重新开始做课程提醒\n",
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = ['Saturday','Sunday','Monday','Friday']\n",
    "weekdays = ['Tuseday','Wednesday','Thusday']\n",
    "\n",
    "if today == 'weekend':\n",
    "    print('今天没有课')\n",
    "elif today == 'weekdays':\n",
    "    if today == 'Tuseday':\n",
    "        print('新媒体分析、虚拟演播厅、数码插画')\n",
    "    if today == 'Wednesday':\n",
    "        print('APP设计、平台经济、形势与政策')\n",
    "    if today == 'Thusday':\n",
    "        print('数码照片、文艺美学、流行文化、就业指导')\n",
    "else:\n",
    "    print()  #em...噢噢可能不能把封装在weekdays里的元素单独拿出来"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-13-20534dfdaed0>, line 16)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-13-20534dfdaed0>\"\u001b[1;36m, line \u001b[1;32m16\u001b[0m\n\u001b[1;33m    elif today == 'sweekdays':\u001b[0m\n\u001b[1;37m       ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "#那我就重新封装\n",
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = ['Saturday','Sunday','Monday','Friday']\n",
    "tus = ['Tuseday']\n",
    "wed = ['Wednesday']\n",
    "thus = ['Thusday']\n",
    "weekdays = tus+wed+thus\n",
    "sweek = wed+thus\n",
    "\n",
    "if today == 'weekend':\n",
    "    print('今天没有课')\n",
    "elif today == 'weekdays':\n",
    "    if today == 'tus':\n",
    "        print('新媒体分析、虚拟演播厅、数码插画')\n",
    "        elif today == 'sweekdays':\n",
    "            if today == 'wed':\n",
    "                print('APP设计、平台经济、形势与政策')\n",
    "                elif today == 'thus':\n",
    "                    print('数码照片、文艺美学、流行文化、就业指导')\n",
    "else:\n",
    "    print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-15-206dc86b91cf>, line 15)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-15-206dc86b91cf>\"\u001b[1;36m, line \u001b[1;32m15\u001b[0m\n\u001b[1;33m    elif today == 'sweeks':\u001b[0m\n\u001b[1;37m       ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = ['Saturday','Sunday','Monday','Friday']\n",
    "tus = ['Tuseday']\n",
    "wed = ['Wednesday']\n",
    "thus = ['Thusday']\n",
    "weekdays = tus+wed+thus\n",
    "sweeks = wed+thus\n",
    "\n",
    "if today == 'weekend':\n",
    "    print('今天没有课')\n",
    "elif today == 'weekdays':\n",
    "    if today == 'tus':\n",
    "        print('新媒体分析、虚拟演播厅、数码插画')\n",
    "        elif today == 'sweeks':\n",
    "            if today == 'wed':\n",
    "                print('APP设计、平台经济、形势与政策')\n",
    "                elif today == 'thus':\n",
    "                    print('数码照片、文艺美学、流行文化、就业指导')\n",
    "else:\n",
    "    print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Tuseday新媒体分析、虚拟演播厅、数码插画;WednesdayAPP设计、平台经济、形势与政策;Thursday数码照片、文艺美学、流行文化、就业指导;FridayPython\t"
     ]
    }
   ],
   "source": [
    "#终于有了小小的成功，但还要再继续完善\n",
    "from datetime import datetime\n",
    "today = datetime.today().weekday\n",
    "weekend = ['Sunday','Monday']\n",
    "\n",
    "if today == 'Saturday':\n",
    "    print('今天没有课')\n",
    "elif today == 'weekend':\n",
    "    if today == 'Sunday':\n",
    "        print('今天没有课')\n",
    "    else:\n",
    "        print('今天周一也还是没有课哦')\n",
    "else:\n",
    "    print('Tuseday新媒体分析、虚拟演播厅、数码插画;WednesdayAPP设计、平台经济、形势与政策;Thursday数码照片、文艺美学、流行文化、就业指导;FridayPython',end=\"\\t\")\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我们来玩一个游戏，测试一下你的名字属性\n",
      "请输入你的名字李婉仪\n",
      "祝你生活幸福，万事顺遂\n",
      "游戏结束\n"
     ]
    }
   ],
   "source": [
    "print (\"我们来玩一个游戏，测试一下你的名字属性\")\n",
    "temp = input (\"请输入你的名字\")\n",
    "if temp == '李婉仪':\n",
    "    print (\"祝你生活幸福，万事顺遂\")\n",
    "elif temp == '李玩意':\n",
    "    print(\"祝你生活幸福，万事顺遂\")\n",
    "else:\n",
    "    print(\"祝你幸福\")\n",
    "print(\"游戏结束\")    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
